function BaseController(page, model) {
    this.model = model;
    this.view = null;
    this.init.apply(this, arguments);
}

BaseController.inherits(Object, {
	init : function(page, data) {		
        
        this.initController(data);
        this.setView(this.createView(page.view));
    },
    
    initController : function(data) {
    	
    },
    
    setView : function(view) {
        this.view = view;
        this.view.ctrl = this;
        this.view.model = this.model;
        this.view.init();
    },
    
    createView : function(view) {
        return new view();
    }
});